<template>
<div>
  <h2 class="demo">{{ msg }}</h2>
  <h2 >学校姓名：{{name}}</h2>
  <h2>学生地址：{{address}}</h2>
  <button @click="sendName">sendName</button>

</div>
</template>

<script>

export default {
  name: "School",
  data(){
    return {
      msg:'School',
      name:'翰林',
      address:'北京'
    }
  },
  props:['getName'],
  methods:{
    sendName(){
      this.getName(this.name)
    }
  }

}
</script>

<style scoped lang="css">
.demo{
  background-color: #95be28;
}
</style>
